package com.cy.aircompressor.db.dao;

import androidx.room.Dao;
import androidx.room.Insert;
import androidx.room.OnConflictStrategy;
import androidx.room.Query;
import androidx.room.Update;


import com.cy.aircompressor.db.bean.AuthBean;

import io.reactivex.Flowable;

@Dao
public interface AuthDao {
    @Insert(onConflict = OnConflictStrategy.REPLACE)
    Long insert(AuthBean authBean);

    @Query("select * from app_auth")
    Flowable<AuthBean> loadAuthInfo();

    @Query("select * from app_auth")
    AuthBean loadAuthBean();

    @Update(onConflict = OnConflictStrategy.REPLACE)
    void update(AuthBean authBean);

    @Query("delete from app_auth")
    void deleteAuthBean();

}
